import 'package:flutter_test/flutter_test.dart';
import 'package:uteped_sdk/uteped_sdk.dart';
import 'package:uteped_sdk/uteped_sdk_platform_interface.dart';
import 'package:uteped_sdk/uteped_sdk_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockUTEPedSdkPlatform
    with MockPlatformInterfaceMixin
    implements UTEPedSdkPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<bool> bFunc(Map<String, Object> params) {
    // TODO: implement bFunc
    throw UnimplementedError();
  }

  @override
  Future<String> sFunc(Map<String, Object> params) {
    // TODO: implement sFunc
    throw UnimplementedError();
  }

  @override
  Future<void> vFunAsync(Map<String, Object> params) {
    // TODO: implement vFunAsync
    throw UnimplementedError();
  }

  @override
  Future<void> vFunc(Map<String, Object> params
      ) {
    // TODO: implement vFunc
    throw UnimplementedError();
  }

  @override
  Future<dynamic> dFunc(Map<String, Object> params) {
    // TODO: implement pFunc
    throw UnimplementedError();
  }

}

void main() {
  final UTEPedSdkPlatform initialPlatform = UTEPedSdkPlatform.instance;

  test('$MethodChannelUTEPedSdk is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelUTEPedSdk>());
  });

  test('getPlatformVersion', () async {
    UTEPedSdk utepedSdkPlugin = UTEPedSdk();
    MockUTEPedSdkPlatform fakePlatform = MockUTEPedSdkPlatform();
    UTEPedSdkPlatform.instance = fakePlatform;

    expect(await utepedSdkPlugin.getPlatformVersion(), '42');
  });
}
